// 加入购物差的请求接口
import request from "../utils/request";

export const reqAddCart =  (skuId,skuNum) =>{
    return request({
        method:'POST',
        url:`/cart/addToCart/${skuId}/${skuNum}`
    })
}

//获取购物车列表
export const reqGetCartList =  () =>{
    return request({
        method:'GET',
        url:`/cart/cartList`
    })
}
//更新isChecked的状态
export const reqUpdateCartChecked =  (skuId,isChecked) =>{
    return request({
        method:'GET',
        url:`/cart/checkCart/${skuId}/${isChecked}`
    })
}
// 删除商品
export const reqDelCart = (skuId) =>{
    return request({
        method:'DELETE',
        url:`/cart/deleteCart/${skuId}`
    })
}